﻿<UserControl x:Class="SLControlLibrary.Demo.DisplayCalendar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:SLCalendar="clr-namespace:SLControlLibrary.Resources.Controls.Calendar.ClassicCalendar;assembly=SLControlLibrary"
    xmlns:basic="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:convert="clr-namespace:SLControlLibrary.Resources.Common.Converters;assembly=SLControlLibrary"
    Width="Auto" Height="Auto"
    Loaded="UserControl_Loaded">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="0">
            <TextBlock Text="Date View" Foreground="Black" />
            <ComboBox x:Name="cbDateView" Width="100" HorizontalAlignment="Left" SelectionChanged="cbDateView_SelectionChanged">
                <ComboBoxItem Content="Decade" IsSelected="True" />
                <ComboBoxItem Content="Year" />
                <ComboBoxItem Content="Month" />
            </ComboBox>
        </StackPanel>
        
        <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="0">
            <TextBlock Text="Viewing Background Color" Foreground="Black" />
            <ComboBox x:Name="cbViewBackgroundColor" Width="100" HorizontalAlignment="Left" SelectionChanged="cbViewBackgroundColor_SelectionChanged" />
        </StackPanel>
        
        <StackPanel Orientation="Vertical" Grid.Row="2" Grid.Column="0">
            <TextBlock Text="Control Height" Foreground="Black" />
            <Slider x:Name="sCntHeight" Width="100" Maximum="500" Minimum="180" HorizontalAlignment="Left" ValueChanged="sCntHeight_ValueChanged" />
        </StackPanel>

        <StackPanel Orientation="Vertical" Grid.Row="3" Grid.Column="0">
            <TextBlock Text="Control Width" Foreground="Black" />
            <Slider x:Name="sCntWidth" Width="100" Maximum="500" Minimum="180" HorizontalAlignment="Left" ValueChanged="sCntWidth_ValueChanged" />
        </StackPanel>
        
        <StackPanel Orientation="Vertical" Grid.Row="4" Grid.Column="0">
            <TextBlock Text="Animation Type" Foreground="Black" />
            <ComboBox x:Name="cbAnimationType" Width="100" HorizontalAlignment="Left" SelectionChanged="cbAnimationType_SelectionChanged">
                <ComboBoxItem Content="None" IsSelected="True" />
                <ComboBoxItem Content="Default" />
            </ComboBox>
        </StackPanel>

        <StackPanel Orientation="Vertical" Grid.Row="5" Grid.Column="0">
            <TextBlock Text="Week Header Color" Foreground="Black" />
            <ComboBox x:Name="cbWeekHeaderColor" Width="100" HorizontalAlignment="Left" />
        </StackPanel>

        <StackPanel Orientation="Vertical" Grid.Row="6" Grid.Column="0">
            <TextBlock Text="Header Background Color" Foreground="Black" />
            <ComboBox x:Name="cbHeaderColor" Width="100" HorizontalAlignment="Left" />
        </StackPanel>

        <StackPanel Orientation="Vertical" Grid.Row="7" Grid.Column="0">
            <TextBlock Text="Header Foreground Color" Foreground="Black" />
            <ComboBox x:Name="cbHeaderForeColor" Width="100" HorizontalAlignment="Left" />
        </StackPanel>
        
        <StackPanel Orientation="Vertical" Grid.Row="8" Grid.Column="0">
            <TextBlock Text="Year Foreground Color" Foreground="Black" />
            <ComboBox x:Name="cbYearForeColor" Width="100" HorizontalAlignment="Left" />
        </StackPanel>
        
        <StackPanel Orientation="Vertical" Grid.Row="9" Grid.Column="0">
            <TextBlock Text="Month Foreground Color" Foreground="Black" />
            <ComboBox x:Name="cbMonthForeColor" Width="100" HorizontalAlignment="Left" />
        </StackPanel>
        
        <basic:TabControl x:Name="tcDisplay" Grid.Row="0" Grid.RowSpan="8" Grid.Column="1" Margin="25,0,0,0">
            <basic:TabItem Header="Control">
                <SLCalendar:ucCalendar x:Name="ccDisplay"
                                       DateView="Decade"
                                       BorderBrush="Black"
                                       VerticalAlignment="Top"
                                       HorizontalAlignment="Center"
                                       DisplayMode="Display"
                                       HeaderForeground="{Binding SelectedItem, ElementName=cbHeaderForeColor}"
                                       HeaderBackground="{Binding SelectedItem, ElementName=cbHeaderColor}"
                                       WeekHeaderForeground="{Binding SelectedItem, ElementName=cbWeekHeaderColor}"
                                       YearForeground="{Binding SelectedItem, ElementName=cbYearForeColor}"
                                       MonthForeground="{Binding SelectedItem, ElementName=cbMonthForeColor}" />        
            </basic:TabItem>
            <basic:TabItem Header="XAML">
            </basic:TabItem>
            <basic:TabItem Header="C# Code">
            </basic:TabItem>
        </basic:TabControl>        
    </Grid>
</UserControl>
